<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>公告信息</title>
    <link rel="stylesheet" href="/Public/css/gxxjkefu-normalize.css">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/model.css">
    <script src="/Public/laydate/laydate.js"></script>
    <style>
        .notice_info {
            padding: 25px 0 15% 5%;
            line-height: 35px;
            color: #979797;
            background: #ffffff;
        }

        .notice_info .notice_info_li {
            width: 90%;
            padding-right: 10%;
            height: 80px;
            line-height: 80px;
            border-bottom: dashed 1px #d2d2d2;
            color: #7f7f7f;
            /*list-style: disc;*/
        }

        .notice_info_li a {
            color: black;
            float: left;
        }

        .notice_info_li span {
            float: right;
        }
    </style>
    <script src="/Public/js/pager.js"></script>
    <link rel="stylesheet" href="/Public/css/pager.css">
    <script src="/Public/js/jquery-3.2.1.js"></script>
</head>
<body>
<ul id="main_C" class="animated fadeInRight">
    <li>
        <div class="title_info">
            <span>公告信息</span>
        </div>
        <ul class="white_bgColor notice_info" style="position: relative">
            <div id="notice_list">


                <volist name="data" id="vo">
                    <li class="notice_info_li">
                        <a href="<{$SERVER_NAME}>/Order/notice_details?id=<{$vo.id}>">
                            <span>● <{$vo.title}></span>
                        </a>
                        <span><{$vo.ctime}></span>
                    </li>
                </volist>
            </div>
            <li id="page_show">
                <div style="position: absolute;bottom: 0;left: 35%">
                    <ul class="pagination" id="page2">
                    </ul>
                    <div class="pageJump">
                        <span>跳转到</span>
                        <input type="text"/>
                        <span>页</span>
                        <button type="button" class="button"></button>
                    </div>
                </div>
            </li>
        </ul>
    </li>
</ul>

<script src="/Public/js/jquery-3.2.1.js"></script>
<script src="/Public/js/bootstrap.min.js"></script>

<script>

    var pageNum = "<{$pageNum}>";
    if(pageNum<=1){
        $("#page_show").hide();
    }

    Page({
        num: pageNum,					//页码数
        startnum: 1,				//指定页码
        elem: $('#page2'),		//指定的元素
        callback: function (n) {	//回调函数
            console.log(n);
            $.post('<{$SERVER_NAME}>/Order/notice_list', {page: n}, function (data) {
                console.log('0000000', data);
                if (data.code == '1001') {
                    var obj = data.result;
                    var s = "";
                    for (var i = 0; i < obj.length; i++) {
                        s += "<li class='notice_info_li'> <a href='<{$SERVER_NAME}>/Order/notice_details?id="+obj[i].id+"'> <span>●" + obj[i].title + "</span></a> <span>" + obj[i].ctime + "</span></li>";
                    }
                    document.getElementById("notice_list").innerHTML = s;
                } else {
                    alert('无数据');
                }
            });
        }
    });

</script>
</body>
</html>